//
//  imageModel.m
//  SimplystylePictorial
//
//  Created by Mac on 15/7/7.
//  Copyright (c) 2015年 Hu. All rights reserved.
//

#import "imageModel.h"

@implementation imageModel

+ (instancetype)setInfoWithDict:(NSDictionary *)dict
{
    imageModel *model = [[imageModel alloc]init];

    model.action_count=dict[@"action_count"];
    model.read_count=dict[@"read_count"];
    model.item_url=dict[@"item_url"];
    model.ID=dict[@"id"];
    model.author=dict[@"author"];
    NSDictionary*imageDic=dict[@"image"];
    model.thumb_url=imageDic[@"raw"];
    model.title=dict[@"title"];
    NSDictionary*textDic=dict[@"text"];
    model.text=textDic[@"text"];
    model.hot=[dict[@"hot"] boolValue];
    //NSLog(@"%d",model.hot);
    
    //program区
    
    NSDictionary*programDic = dict[@"program"];
    model.programName=programDic[@"name"];
    
    return model;
}
@end
